import { post } from '@/core/utils/http';
import type { Response } from '@/core/models';

/** 根据用户序列获取门店数据 */
export const queryStoreByUserId = (data : any) : Promise<Response<any>> => {
	return post('Api/Store/GetStoreByUserId', {
		data,
	}, true);
}

/** 获取门店订单列表 */
export const queryOrderPageByMerchant = (data : any) : Promise<Response<any>> => {
	return post('Api/Store/GetOrderPageByMerchant', {
		data,
	}, true);
}

/** 获取单个用户能管理的门店列表 */
export const queryStoreListForUser = (data : any) : Promise<Response<any>> => {
	return post('Api/Store/GetStoreListForUser', {
		data,
	}, true);
}

/** 获取店铺提货单列表 */
export const queryStoreLadingList = (data : any) : Promise<Response<any>> => {
	return post('Api/Store/StoreLadingList', {
		data,
	}, true);
}

/** 提货单删除 */
export const queryLadingDelete = (data : any) : Promise<Response<any>> => {
	return post('Api/Store/LadingDelete', {
		data,
	}, true);
}

/** 获取提货单详情 */
export const queryLadingInfo = (data : any) : Promise<Response<any>> => {
	return post('Api/Store/LadingInfo', {
		data,
	}, true);
}

/** 店铺提单核销操作 */
export const queryLading = (data : any) : Promise<Response<any>> => {
	return post('Api/Store/Lading', {
		data,
	}, true);
}


/** 判断是否是店员 */
export const queryIsClerk = (data ?: any) : Promise<Response<any>> => {
	return post('Api/Store/IsClerk', {
		data,
	}, true);
}

/** 门店核销的服务券列表 */
export const queryVerificationPageList = (data ?: any) : Promise<Response<any>> => {
	return post('Api/Service/VerificationPageList', {
		data,
	}, true);
}

/** 删除核销券 */
export const queryLogDelete = (data ?: any) : Promise<Response<any>> => {
	return post('Api/Service/LogDelete', {
		data,
	}, true);
}

/** 获取服务券详情准备核销 */
export const queryServiceVerificationTicketInfo = (data ?: any) : Promise<Response<any>> => {
	return post('Api/Service/GetTicketInfo', {
		data,
	}, true);
}

/** 核销服务券 */
export const queryVerificationTicket = (data ?: any) : Promise<Response<any>> => {
	return post('Api/Service/VerificationTicket', {
		data,
	}, true);
}